package com.api.shopapi.service.impl;

import com.api.shopapi.entity.DishesPlan;
import com.api.shopapi.mapper.DishesPlanMapper;
import com.api.shopapi.service.DishesPlanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("DishesPlanServiceImplOne")
public class DishesPlanServiceImplOne implements DishesPlanService {

    @Autowired
    private DishesPlanMapper dishesPlanMapper;

    @Override
    public
    int insert(DishesPlan dishesPlan){
        return dishesPlanMapper.insert(dishesPlan);
    }

    @Override
    public
    int delete(String dishesPlanCode){
        return dishesPlanMapper.delete(dishesPlanCode);
    }

    @Override
    public
    int update(DishesPlan dishesPlan){
        return dishesPlanMapper.update(dishesPlan);
    }

    @Override
    public
    DishesPlan getByDishesPlanCode( String dishesPlanCode){
        return dishesPlanMapper.getByDishesPlanCode(dishesPlanCode);
    }

    @Override
    public
    List<DishesPlan> ListByCarePlaceCode(String carePlaceCode){
        return dishesPlanMapper.ListByCarePlaceCode(carePlaceCode);
    }

}
